/*
 * Copyright (c) 2022 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef OLA_RANDOM_H
#define OLA_RANDOM_H

#include "ola_sdk_api.h"

#ifdef __cplusplus
extern "C" {
#endif

/*
 * 功能：随机数功能初始化
 * 返回：返回OLA_OK表示初始化成功，其它值表示初始化失败
 */
int OlaRandInit(void);

/*
 * 功能：获取随机数
 * 参数：rand，随机数缓冲，用于存放获取到的随机数
         size，随机数缓冲大小
 * 返回：返回OLA_OK表示获取成功，其它值表示获取失败
 */
int OlaRand(unsigned char *rand, unsigned int size);

#ifdef __cplusplus
}
#endif

#endif /* OLA_RANDOM_H */